<div id="filter">
    <input type="hidden" id="chapter" value={{ chapter }}>
    <div id="category_choice">
        <a class="category_link {% if category == 0 %}active{% endif %}" href='#0'>All</a>
        <a class="category_link {% if category == 2 %}active{% endif %}" href='#2'>News</a>
        <a class="category_link {% if category == 1 %}active{% endif %}" href='#1'>Personal</a>
        <a class="category_link {% if category == 3 %}active{% endif %}" href='#3'>Entertainment</a>
        <a class="category_link {% if category == 4 %}active{% endif %}" href='#4'>Sports</a>
        <a class="category_link {% if category == 5 %}active{% endif %}" href='#5'>Tech</a>
        <a class="category_link {% if category == 6 %}active{% endif %}" href='#6'>Lifestyle</a>
        <a class="category_link {% if category == 7 %}active{% endif %}" href='#7'>Business</a>
        <a class="category_link {% if category == 8 %}active{% endif %}" href='#8'>Travel</a>
    </div>

    {% if user.is_authenticated %}
        <div id="user_choice">
            <a class="user_link {% if user_category == 0 %}active{% endif %}" href='#0'>Everyone</a>
            <a class="user_link {% if user_category == 1 %}active{% endif %}" href='#1'>Following</a>
        </div>
    {% endif %}

    <div id="location_choice">
        {% if user.is_authenticated and user.location and country != 'all' %}
            <a class="world_link" href='#0'>Worldwide</a>
        {% else %}
            <a class="world_link active" href='#0'>Worldwide</a>
        {% endif %}
        {{ form.location }}
    </div>
</div>